#include <fstream>
#include <iostream>
#include <stdlib.h>

using namespace std;

int main(int argc, char* argv[])
{
	const char* geomFile = "geom_few.txt";
	const char* rayFile = "ray_few.txt";
	const char* outputFile = "out_few.txt";

	int iNumTriangle = 1000;
	int iRay = 1000;

	ofstream streamOut;

    streamOut.open(geomFile);
    streamOut << iNumTriangle << endl;
    for (int i = 0; i < iNumTriangle*3; i++)
    {
		streamOut << rand()*1.0*2000/RAND_MAX-1000 << " " << rand()*1.0*2000/RAND_MAX-1000 << " " << rand()*1.0*2000/RAND_MAX-1000 << endl;
    }
    streamOut.close();

	streamOut.open(rayFile);
    streamOut << iRay << endl;
    for (int i = 0; i < iRay; i++)
    {
		streamOut << rand()*1.0*2000/RAND_MAX-1000 << " " << rand()*1.0*2000/RAND_MAX-1000 << " " << rand()*1.0*2000/RAND_MAX-1000 << endl;
		streamOut << rand()*1.0*2/RAND_MAX-1 << " " << rand()*1.0*2/RAND_MAX-1 << " " << rand()*1.0*2/RAND_MAX-1 << endl;
    }
    streamOut.close();

	return 0;
}

